<?php 
$cs=Yii::app()->clientScript;
$cssUrl= Yii::app()->request->baseUrl."/css/";
$jsUrl = Yii::app()->request->baseUrl."/js/";
$cs->registerCssFile($cssUrl."adv_ad.css");
$cs->registerCssFile($cssUrl."ad_profile.css");
$cs->registerCssFile($cssUrl."ad_status_edit.css");
$cs->registerScriptFile($jsUrl."ad_status_edit.js");
?>
<div id="main-col" class="div">
	<div class="mainColInner">
		<div class="subPageHeader">
			<h1><?=Yii::t('adv', 'info_statistics')?></h1>
			<?php echo CHtml::link(Yii::t('adv', 'list'),$this->createUrl('/adv/ads'),array('class'=>'text-with-icon-14 float-right'));?>
		</div>
		<div class="adv_ad statistics over-hidden">
			<div class="pa-20 float-right menu">
				<?php $this->widget('AdEditMenu',array(
									'id'=>$model->id,'status'=>Ad::converStatus($model->status),
									'balance'=>number_format($model->budget-$model->uv * $model->details->cpuv,2)
				));?>
			</div>
			<div class="float-left">
				<div class="adProfile">
					<div class="float-left">
						<?php $this->widget('AdImage',array('image'=>$model->details->image));?>
						<?php $this->widget('AdSpentGraph');?>
					</div>
					<?php $this->widget('AdInfo',array('adTitle'=>$model->details->title,'description'=>$model->details->description,'link'=>$model->details->link));?>
				</div>
			</div>
		</div>
		<?php $this->widget('AdStatistics',array('ad_id'=>$model->id));?>		
	</div>
</div>